package com.ftg.learn.chapter08.animalduotai;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 动物类
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/7/28 8:53
 */
@AllArgsConstructor
@Data
@NoArgsConstructor
public class Animal {
    private String name;
    private String brand;


    public void shout(){
        System.out.println("叫");
    }

    public void move(){
        System.out.println("移动");
    }

    public static void main(String[] args) {
        Animal animal=new Animal();
        animal.move();
        animal.shout();

        Animal animal1=new Chicken();
        animal1.shout();
        animal1.move();

        Animal animal2=new Donkey();
        animal2.shout();
        animal2.move();
    }
}
